package com.wky.basic.query;

import com.wky.basic.pojo.BasePojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseQuery extends BasePojo {
    //当前页码
    private Integer pageNum = 1;
    //每页显示的记录数
    private Integer pageSize = 5;

    //计算开始索引,mybatis用satter方法获取
    public Integer getStart() {
        return (pageNum - 1) * pageSize;
    }
}
